package com.example.produces.service.impl;

import com.example.produces.entity.Pay;
import com.example.produces.mapper.PayMapper;
import com.example.produces.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class PayImpl implements PayService {
    @Autowired
    private PayMapper payMapper;
    @Override
    public List<Pay> findAll() {
        List<Pay>pays=payMapper.findAll();
        return pays;
    }

    @Override
    public void add(Pay pay) {
       payMapper.add(pay);
    }

    @Override
    public Pay findOne(String retainage) {
        return payMapper.findOne(retainage);
    }

    @Override
    public void upDate(Pay pay) {
      payMapper.upDate(pay);
    }

    @Override
    public void delete(String retainage) {
      payMapper.delete(retainage);
    }
}
